package com.example.houseman.enums;
/**
 * 收款类型 ,1:房租收款 2：租务收款 3：解约结算收款  4:续约结算收款
 * @author wsh
 *
 */
public enum ReceiptTypeEnum {
	FZ("房租收款",1),
	ZW("租务收款",2),
	JYJS("解约结算收款",3),
	XYJS("续约结算收款",4);
	
	private String name;
	private int index;

	private ReceiptTypeEnum(String name, int index) {
		this.name = name;
		this.index = index;
	}

	// 普通方法
	public static String getName(int index) {
		for (ReceiptTypeEnum c : ReceiptTypeEnum.values()) {
			if (c.getIndex() == index) {
				return c.name;
			}
		}
		return null;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}

}
